package com.qf.blog.pool;

import com.alibaba.druid.pool.DruidDataSource;
import org.apache.ibatis.datasource.pooled.PooledDataSourceFactory;

public class MyDruidDataSourceFactory extends PooledDataSourceFactory {

    public MyDruidDataSourceFactory() {
        // dataSource用德鲁伊来初始化
        DruidDataSource dataSource = new DruidDataSource();
        dataSource.setMaxActive(20);
        this.dataSource = dataSource;//替换数据源
    }
}